<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var n = 10;
    //先执行do语句，再进行判断
    do {
        document.write('进行' + '1次' + '<br>')//加<br>标签实现换行
        n++
    } while (n < 3)
    document.write('后续代码')
</script>
</body>
</html>